package com.empirisoftware.datastore;

import java.io.Serializable;

import com.empirisoftware.api.HasKey;
import com.empirisoftware.api.ObjectNotFoundException;

public interface DAO {

	/**
	 * @see com.empirisoftware.api.DAO#save(java.lang.Class, T)
	 */
	<T extends HasKey> T save(Class<T> clazz, T o) throws DatastoreException; // NO_UCD

	/**
	 * @throws ObjectNotFoundException
	 * @see com.empirisoftware.api.DAO#getByID(java.lang.Class,
	 *      java.io.Serializable)
	 */
	<T extends Serializable> T get(Class<T> clazz, // NO_UCD
			Serializable key)  throws DatastoreException, ObjectNotFoundException;

}